home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug233 / mscalls.asm < prev    next >
Assembly Source File  |  1987-06-30  |  896b  |  34 lines

  1. ;   VERSION 0001  (DATE: 17/05/87)  (TIME: 12:47)   ;
  2. COMMENT *
  3.     macros to be used in calling MicroSoft Fortran (v. 3.2)
  4.     double precision transcendentals from Data Light C compiler
  5.     
  6.     file:    mscalls.asm
  7.     date:    17.V.87
  8.     author: J. W. Haefner
  9.  
  10.     use:    see "fsin.asm"
  11.     requires: MACROS.ASM from DLC
  12. *
  13. INCLUDE    MACROS.ASM
  14.  
  15. callpro    MACRO    res
  16.     push    BP        ;save old frame ptr
  17.     mov    BP,SP
  18.     mov    BX,BP
  19.     add    BX,p
  20.     push    SS        ;push segment of arg, reqd by MSFortran
  21.     push    BX        ;addr of sin arg on stack
  22.     mov    BX,OFFSET res    ;offset of temp var for return
  23.     push    BX
  24.     ENDM
  25.  
  26. callepi MACRO
  27. ;    mov    SP,BP        ;MS routines do this already
  28.     mov    DX,[temp+0]    ;DLC expects LSB in DL
  29.     mov    CX,[temp+2]
  30.     mov    BX,[temp+4]
  31.     mov    AX,[temp+6]    ;DLC expects MSB in AH
  32.     pop    BP        ;regain old frame ptr
  33.     ENDM
  34.